SpatialStream® Code Examples

GetGeocode and Demographic

This example uses the GetGeocode functional component, and illustrates one of the interactive mapping features you can implement using the full parcel geometry results from the GetGeocode functional component. Here, the address, city, state and zipcode of a location are passed into the geocoding engine using GetGeocode, and along with the Spatial Link Component, returns demographic data associated with that property/

GetGeocode

var layer = new Dmp.Layer.TileLayer("Parcels", "SS");
layer.addChild("ParcelTiles", "SS.Base.Parcels/ParcelTiles", "", {
zIndex: 3, zoomRange: {
min: 16, max: 19
}
});
map.addEntity(layer);

//----------------

var url = "GetGeocode.aspx?";
url += "&address=" + document.getElementById("address").value;
url += "&city=" + document.getElementById("city").value;
url += "&state=" + document.getElementById("state").value;
url += "&zip=" + document.getElementById("zip").value;
url += "&fields=*,[resource](*),CENSUSBLOCKG(*,DEMOGEXEC(*))";
url += "&datasource=PARCELS,STREET_CENTERLINE";
url += "&showschema=false";

Dmp.Env.Connections["SS"].getJson(url, geocodeSuccess, geocodeFailure);


Run Sample   Back To Index